
module.exports = {
    numClients:0,//在线人数
    lineArr:[], //在线人数集合
    addLine(join){ //加入在线
        let arr = this.lineArr
        if(arr.includes(join) || !join) return arr
        arr.push(join)
        return arr
    },
    subtractLine(join){ //去掉在线
        let arr = this.lineArr
        if(!arr.includes(join)) return arr
        arr.splice(arr.findIndex(item => item === join), 1)
        return arr
    }
}